package cn.wolfcode.orderServer.feign;

import cn.wolfcode.orderServer.feign.fallback.ProductFeignFallBack;
import cn.wolfcode.productServer.domain.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

// 整合Sentinel 添加fallback = ProductFeignFallBack.class 需要降级的类
@FeignClient(name = "product-service", fallback = ProductFeignFallBack.class)
public interface ProductFeignApi {
    // 集成feign
    @RequestMapping("/product/get")
    public Product get(@RequestParam("id") Long id);
}
